<div class="pageContent">
	<form class="required-validate"
		onsubmit="return validateCallback(this,dialogAjaxDone)" method="post"
		action="<?php echo $action?>" name="form_sysgroup"
		id="form_sysgroup">
		<div layouth="60" class="pageFormContent"
			style="height: 431px; overflow: auto;">
			<div>
				<label>分组名称：</label> <input type="text" value="<?php echo $group['title']?>"
					class="required textInput valid" name="title" id="title">
			</div>
			<div class="divider"></div>
			<div class="panel" defH="355">
				<h1>权限配置</h1>
				<div>
					<ul class="tree treeFolder treeCheck expand">
					<?php foreach ($functions as $module=>$module_namespace):?>
						<?php if (count($module_namespace)):?>
							<li><a><?php echo Module::get_title($module)?></a>
								<ul>
									<?php foreach ($module_namespace as $namespace=>$namespace_controller):?>
										<?php if (count($namespace_controller)):?>
											<li><a><?php echo Namespaces::get_title($namespace)?></a>
												<ul>
													<?php foreach ($namespace_controller as $controller=>$controller_action):?>
														<?php if (count($controller_action)):?>
															<li><a><?php echo Controller::get_title($controller)?></a>
																<ul>
																	<?php foreach ($controller_action as $action=>$title):?>
																		<li><a tname="power<?php echo "[$module][$namespace][$controller][$action]"?>" tvalue="1"
																			<?php if (isset($group['power'][$module][$namespace][$controller][$action]) && $group['power'][$module][$namespace][$controller][$action]):?>
																			checked="true"
																			<?php endif;?>
																		><?php echo $title?></a></li>
																	<?php endforeach;?>
																</ul>
															</li>
														<?php else:?>
															<li><a tname="power<?php echo "[$module][$namespace][$controller]"?>" tvalue="1"><?php echo $controller?></a></li>
														<?php endif;?>
													<?php endforeach;?>
												</ul>
											</li>
										<?php else :?>
											<li><a tname="power<?php echo "[$module][$namespace]"?>" tvalue="1"><?php echo $namespace?></a></li>
										<?php endif;?>
									<?php endforeach;?>
								</ul>
							</li>
						<?php else :?>
							<li><a tname="power<?php echo "[$module]"?>" tvalue="1"><?php echo $module?></a></li>
						<?php endif;?>
					<?php endforeach;?>
					</ul>
				</div>
			</div>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">提交</button>
						</div>
					</div></li>
				<li><div class="button">
						<div class="buttonContent">
							<button class="close" type="button">取消</button>
						</div>
					</div></li>
			</ul>
		</div>
	</form>
</div>